<div class="uk-layui-form">
	<form class="layui-form uk-form" action="/apps/profile/save.html" <#if index?? >${index!''}<#else>target="maincontent"</#if> >
	  <input type="hidden" name="id" value="${userData.id!''}">
	  <#if index?? ><input type="hidden" name="index" value="${index!''}"></#if>
	  <div class="layui-form-item">
	    <label class="layui-form-label">用户名：</label>
	    <div class="layui-input-inline">
	      ${userData.username!''}
	    </div>
	    <div class="layui-form-mid layui-word-aux">用户登录的账号</div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">姓名：</label>
	    <div class="layui-input-inline">
	      <input type="text" name="uname" value="${userData.uname!''}" required lay-verify="required" placeholder="请输入用户姓名" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">电子邮件</label>
	    <div class="layui-input-inline">
	      <input type="email" name="email" value="${userData.email!''}" required lay-verify="required email"  placeholder="请输入电子邮件地址" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">密码</label>
	    <div class="layui-input-inline">
	      <input type="password" id="password" name="password" placeholder="请输入登录密码" lay-verify="pass" autocomplete="off" class="layui-input">
	    </div>
	    <div class="layui-form-mid layui-word-aux">
	    	<input type="password" id="repassword" name="repassword" lay-verify="repass" placeholder="请再次输入密码" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">手机号：</label>
	    <div class="layui-input-inline">
	      <input type="mobile" name="mobile" value="${userData.mobile!''}" required lay-verify="required|phone"  placeholder="请输入手机号码" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <!-- <#if userData?? && userData.usertype != '0'> -->
		  <div class="layui-form-item">
		    <label class="layui-form-label">启用坐席功能：</label>
		    <div class="layui-input-block">
		      <input type="checkbox" name="agent" lay-skin="switch" value="1" <#if userData?? && userData.agent == true>checked</#if>>
		    </div>
		  </div>
	  <!-- </#if> -->
	  <div class="layui-form-button">
	    <div class="layui-button-block">
	      <button class="layui-btn" lay-submit lay-filter="profile">立即提交</button>
	      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
	    </div>
	  </div>
	</form>
</div>
 
<script>
//Demo
layui.use('form', function(){
  var form = layui.form();
  form.on('submit(*)', function(data){
	  layerhelper.close('mainajaxwin');
	  return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
  });
  form.render(); //更新全部
  form.verify({
	  repass: function(value){
	    if(value != $('#password').val()){
	      return '两次输入的密码不一致，请确认';
	    }
	  }
	});      
});
</script>